package com.flute.haflute.jobbox.base.mapreduce;

import java.util.List;

import com.flute.haflute.jobbox.base.mapreduce.KeyBase;
import com.flute.haflute.jobbox.base.mapreduce.ValueBase;

/**
 * MapReduce机制中的Map任务接口
 * 
 * @author Liu Liu
 * @date 2010-5-7
 */
public interface ReduceTaskBase {

	/**
	 * 根据运行时情况需要对执行的任务进行动态环境的配置
	 * 
	 * @param jobConf
	 *            MRJobConf
	 * @throws Exception
	 */
	public void configure(MRJobConf jobConf) throws Exception;
	
	/**
	 * 具体reduce计算
	 * @param collector OutputCollector
	 * @param key KeyBase
	 * @param val ValueBase
	 * @throws Exception
	 */
	public void reduce(OutputCollector collector, KeyBase key,
			List<ValueBase> values) throws Exception;
}
